<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script type="text/javascript" src="<%=basePath%>backgroundManager/js/editRemote.js"></script>
<form id="pagerForm" method="post" action="<%=basePath%>remote_findRemoteForChannel.action"> <!-- 此action指定的是排序、分页所提交的action -->
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="${requestScope.pageNum }" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
	<!-- 存放查询条件 -->
	<input type="hidden" name="channelNumber" value="${requestScope.channelNumber }" />
	<input type="hidden" name="countryCode" value="${requestScope.countryCode}">
	<input type="hidden" name="chanName2" value="${requestScope.chanName2}">
	<input type="hidden" name="areaCode" value="${requestScope.areaCode}">
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath%>remote_findRemoteForChannel.action" method="post">
	<div class="searchBar">
				<div class="pageFormContent1">
				<input type="hidden" name="channelNumber" value="${requestScope.channelNumber }" />
					<p>
						<label>渠道名称：</label>
						<input type="text" name="channelName" readonly value="${requestScope.channelName }" />
					</p>
					<p>
					<label>国家CODE：</label>
					<input id="countryccode2" type="text" name="countryCode" value="${requestScope.countryCode}" />
					</p>
					<p>
					<label>国家名称：</label>
					<input id="countrynname2" type="text" name="chanName2" value="${requestScope.chanName2}"/>
					</p>
					<p>
					<label>邮编：</label>
					<input type="text" name="areaCode" value="${requestScope.areaCode}" />
					</p>
				</div>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">&nbsp;&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;&nbsp;</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="delete" href="<%=basePath%>remote_delRemotes.action" target="selectedTodo" posttype="string" rel="ids" title="确定要删除吗?"><span>删除偏远</span></a></li>
			<li><a class="edit" href="<%=basePath%>remote_getRemoteByID.action?remoteId={sid_user}" width="500" height="350" target="dialog" rel="modifyRemote"><span>修改偏远</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="163">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="100" orderField="CLIENT_COUNTRY_CODE" class="${requestScope.orderDirection}">国家CODE</th>
				<th width="100">国家名(CN)</th>
				<th width="100" >国家名(EN)</th>
				<th width="120" orderField="CLIENT_AREA_CODE" class="${requestScope.orderDirection}">邮编</th>
				<th width="100"orderField="CLIENT_PROVINCE_NUMBER" class="${requestScope.orderDirection}">省</th>
				<th width="100"orderField="CLIENT_CITY_NUMBER" class="${requestScope.orderDirection}">市</th>
				<th width="80"orderField="CLIENT_AREA_NUMBER" class="${requestScope.orderDirection}">区</th>
				<th width="110"orderField="P_REMOTE_COST" class="${requestScope.orderDirection}">费用公式</th>
				<th width="80"orderField="P_REMOTE_ADD_DATE" class="${requestScope.orderDirection}">添加时间</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${requestScope.remotes}" var="remote">
			<tr target="sid_user" rel="${remote.PRemoteId }">
				<td><input name="ids" value="${remote.PRemoteId }" type="checkbox"></td>
				<td>${remote.clientCountryCode }</td>
				<td>${remote.clientCountryCN }</td>
				<td>${remote.clientCountryEN }</td>
				<td>${remote.clientAreaCode }</td>
				<td>${remote.clientProvinceName }</td>
				<td>${remote.clientCityName }</td>
				<td>${remote.clientAreaName }</td>
				<td>${remote.PRemoteCost }</td>
				<td>${remote.PRemoteAddDate }</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select id="countSelect" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="10">10</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span>条，共${requestScope.totalRecords}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${requestScope.totalRecords}" numPerPage="${requestScope.pageSize}" pageNumShown="${requestScope.totalPages}" currentPage="${requestScope.pageNum }"></div>

	</div>
</div>
<script type="text/javascript">
	(function () {
		var a = document.getElementById("countSelect");
		switch(${requestScope.numPerPage}){
			case 10:
				a.options.selectedIndex = 0;
				break;
			case 50:
				a.options.selectedIndex = 1;
				break;
			case 100:
				a.options.selectedIndex = 2;
				break;
		}
	})();
</script>
